#ifndef TEXTURE2D_H
#define TEXTURE2D_H

#include <string>

enum TextureWrap
{
    TEXTURE_WRAP_CLAMP,
    TEXTURE_WRAP_REPEAT
};

class Texture2D
{
private:
    /* data */
    int _width, _height;
    TextureWrap _texWrap;
    unsigned int _textureID;

public:
    Texture2D(const std::string path = nullptr, TextureWrap wrap = TEXTURE_WRAP_CLAMP) : _texWrap(wrap)
    {
        if (!path.empty())
        {
            loadFile(path, wrap);
        }
    }
    ~Texture2D();

    void loadFile(const std::string path, TextureWrap wrap);
    unsigned int getTextureID() const;
    int getWidth() const;
    int getHeight() const;
    void use() const;
};

#endif // TEXTURE2D_H
